﻿#region File and License Information
/*
<File>
	<License>
		Copyright © 2009 - 2017, Daniel Vaughan. All rights reserved.
		This file is part of Calcium (http://calciumsdk.net), 
		which is released under the MIT License.
		See file /Documentation/License.txt for details.
	</License>
	<CreationDate>2010-08-19 12:01:26Z</CreationDate>
</File>
*/
#endregion

using Microsoft.Phone.Marketplace;
using Microsoft.Phone.Tasks;

namespace Outcoder.Services.Implementation
{
	public class MarketplaceService : IMarketplaceService
	{
		public bool Trial
		{
			get
			{
				LicenseInformation licenseInformation = new LicenseInformation();
				return licenseInformation.IsTrial();
			}
		}

		public void Register(string appId = null)
		{
			MarketplaceDetailTask task = new MarketplaceDetailTask();
			if (!string.IsNullOrWhiteSpace(appId))
			{
				task.ContentIdentifier = appId;
			}
			task.Show();
		}

		public void Review()
		{
			MarketplaceReviewTask task = new MarketplaceReviewTask();
			task.Show();
		}
	}
}
